<html>
<head><meta charset="utf-8"><title>QuantifiedApply · wg-traits · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/index.html">wg-traits</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/QuantifiedApply.html">QuantifiedApply</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="182816963"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/QuantifiedApply/near/182816963" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/QuantifiedApply.html#182816963">(Dec 06 2019 at 23:58)</a>:</h4>
<p>Hey <span class="user-mention" data-user-id="125131">@detrumi</span> I was taking a look at your <code>QuantifiedApply</code> branch</p>



<a name="182816971"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/QuantifiedApply/near/182816971" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/QuantifiedApply.html#182816971">(Dec 06 2019 at 23:58)</a>:</h4>
<p>I'm starting to think that the right thing is to not make any attempt to be "general" and to rename <code>QuantifiedApply</code> to just <code>Fn</code></p>



<a name="182816984"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/QuantifiedApply/near/182816984" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/QuantifiedApply.html#182816984">(Dec 06 2019 at 23:58)</a>:</h4>
<p>I'm going to push a bit of a "messy" commit that passes tests and fixes your recursion problem but looks a bit funny</p>



<a name="182817165"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/QuantifiedApply/near/182817165" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/QuantifiedApply.html#182817165">(Dec 07 2019 at 00:01)</a>:</h4>
<p>the commit message explains a bit more what's going on</p>



<a name="182817224"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/QuantifiedApply/near/182817224" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/QuantifiedApply.html#182817224">(Dec 07 2019 at 00:02)</a>:</h4>
<p>the reason you were getting infinite recursion had to do with the definition of <code>substitute</code> that you had--</p>



<a name="182817267"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/QuantifiedApply/near/182817267" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/QuantifiedApply.html#182817267">(Dec 07 2019 at 00:03)</a>:</h4>
<p>the idea with substitute was that it would take <code>for&lt;'p0...'pn&gt; T</code>, along with some lifetimes <code>'x0...'xn</code>, and return <code>['p0=&gt;'x0...'pn=&gt;'xn] T</code></p>



<a name="182817270"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/QuantifiedApply/near/182817270" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/QuantifiedApply.html#182817270">(Dec 07 2019 at 00:03)</a>:</h4>
<p>i.e., it "removed" one level of binder</p>



<a name="182817276"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/QuantifiedApply/near/182817276" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/QuantifiedApply.html#182817276">(Dec 07 2019 at 00:03)</a>:</h4>
<p>but in your formulation it didn't do that</p>



<a name="182817284"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/QuantifiedApply/near/182817284" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/QuantifiedApply.html#182817284">(Dec 07 2019 at 00:03)</a>:</h4>
<p>it preserved the levels of binders</p>



<a name="182817294"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/QuantifiedApply/near/182817294" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/QuantifiedApply.html#182817294">(Dec 07 2019 at 00:03)</a>:</h4>
<p>hence the infinite recursion</p>



<a name="182817308"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/QuantifiedApply/near/182817308" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/QuantifiedApply.html#182817308">(Dec 07 2019 at 00:03)</a>:</h4>
<p>however, the only <em>need</em> for that function in the first place was so that we could do <code>unify_forall_other</code> -- i.e., unify a type like <code>for&lt;'a&gt; T</code> and <code>U</code></p>



<a name="182817366"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/QuantifiedApply/near/182817366" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/QuantifiedApply.html#182817366">(Dec 07 2019 at 00:04)</a>:</h4>
<p>but in practice <em>all</em> <code>for&lt;'a&gt;</code> types in Rust are tied to <code>fn</code> types of some ABI or another. And in fact that's exactly the point of this change, to kind of "fuse" together the quantification with the <code>fn</code> type, versus having them separated as chalk was originally intending -- this matches better Rust and just generally matches the syntax of Rust types better</p>



<a name="182817372"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/QuantifiedApply/near/182817372" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/QuantifiedApply.html#182817372">(Dec 07 2019 at 00:04)</a>:</h4>
<p>(note that the other place you get <code>for</code> is <code>dyn</code> types, and they have a binder baked in already (in both rustc and chalk))</p>



<a name="182817397"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/QuantifiedApply/near/182817397" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/QuantifiedApply.html#182817397">(Dec 07 2019 at 00:05)</a>:</h4>
<p>anyway so what this means is that if you think of <code>for&lt;'a&gt; T</code> as <em>really</em> being like <code>for&lt;'a&gt; fn(T)</code>-- then it makes no sense to unify a <code>for&lt;'a&gt; fn(T)</code> with some other non-forall type <code>U</code></p>



<a name="182817399"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/QuantifiedApply/near/182817399" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/QuantifiedApply.html#182817399">(Dec 07 2019 at 00:05)</a>:</h4>
<p>that's like unifying a <code>Vec</code> and a <code>fn</code></p>



<a name="182817405"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/QuantifiedApply/near/182817405" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/QuantifiedApply.html#182817405">(Dec 07 2019 at 00:05)</a>:</h4>
<p>so if just make that an error, we don't need the function, but we have to patch up a few random tests</p>



<a name="182817461"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/QuantifiedApply/near/182817461" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/QuantifiedApply.html#182817461">(Dec 07 2019 at 00:06)</a>:</h4>
<p><del>I'm not actually sure if I did the right thing patching up the <code>forall_projection</code> tests the way I did</del></p>



<a name="182817466"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/QuantifiedApply/near/182817466" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/QuantifiedApply.html#182817466">(Dec 07 2019 at 00:06)</a>:</h4>
<p><del>maybe I should have added some <code>for&lt;&gt;</code> into the impl instead</del></p>



<a name="182817470"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/QuantifiedApply/near/182817470" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/QuantifiedApply.html#182817470">(Dec 07 2019 at 00:06)</a>:</h4>
<p><del>I'm a bit confused what the intent of those tests was</del></p>



<a name="182817486"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/QuantifiedApply/near/182817486" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/QuantifiedApply.html#182817486">(Dec 07 2019 at 00:06)</a>:</h4>
<p><del>let me tinker with that...</del></p>



<a name="182817604"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/QuantifiedApply/near/182817604" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/QuantifiedApply.html#182817604">(Dec 07 2019 at 00:08)</a>:</h4>
<p><del>ok, yeah, I think I did that wrong...</del></p>



<a name="182817609"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/QuantifiedApply/near/182817609" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/QuantifiedApply.html#182817609">(Dec 07 2019 at 00:08)</a>:</h4>
<p>/me fixes</p>



<a name="182817655"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/QuantifiedApply/near/182817655" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/QuantifiedApply.html#182817655">(Dec 07 2019 at 00:09)</a>:</h4>
<p>fixed</p>



<a name="182880730"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/QuantifiedApply/near/182880730" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/QuantifiedApply.html#182880730">(Dec 08 2019 at 06:58)</a>:</h4>
<p>Makes sense</p>



<a name="182880811"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/QuantifiedApply/near/182880811" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/QuantifiedApply.html#182880811">(Dec 08 2019 at 07:02)</a>:</h4>
<p>Though I'm confused as to why the <code>for&lt;&gt;</code> was introduced in tests like this:</p>
<div class="codehilite"><pre><span></span>for&lt;&#39;a&gt; &lt;Unit as DropLt&lt;&#39;a&gt;&gt;::Item: Eq&lt;for&lt;&gt; Unit&gt;
</pre></div>


<p>There's no functions involved in these tests?</p>



<a name="182880969"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/QuantifiedApply/near/182880969" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/QuantifiedApply.html#182880969">(Dec 08 2019 at 07:07)</a>:</h4>
<p>You mentioned that forall types will only be created for function types, but here they're used around associated types?</p>



<a name="182987486"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/QuantifiedApply/near/182987486" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/QuantifiedApply.html#182987486">(Dec 09 2019 at 18:58)</a>:</h4>
<p><span class="user-mention" data-user-id="125131">@detrumi</span> well in effect the <code>for&lt;&gt;</code> notation should be read as <code>fn()</code></p>



<a name="182987546"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/QuantifiedApply/near/182987546" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/QuantifiedApply.html#182987546">(Dec 09 2019 at 18:59)</a>:</h4>
<p>so e.g., the <code>for&lt;'a&gt; &lt;Unit as  DropLt&lt;'a&gt;&gt;::Item</code> is kind of <code>for&lt;'a&gt; fn(&lt;Unit as  DropLt&lt;'a&gt;&gt;::Item)</code></p>



<a name="182987553"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/QuantifiedApply/near/182987553" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/QuantifiedApply.html#182987553">(Dec 09 2019 at 18:59)</a>:</h4>
<p>(at least, with the changes I made)</p>



<a name="182987568"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/QuantifiedApply/near/182987568" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/QuantifiedApply.html#182987568">(Dec 09 2019 at 18:59)</a>:</h4>
<p>so in order to unify, then, we had to add a <code>fn(Unit)</code> on the other side</p>



<a name="182987588"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/QuantifiedApply/near/182987588" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/QuantifiedApply.html#182987588">(Dec 09 2019 at 18:59)</a>:</h4>
<p>but if we go this road, we would presumably (a) change the name to <code>Fn</code> or something and then (b) change the syntax</p>



<a name="182987845"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/QuantifiedApply/near/182987845" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/QuantifiedApply.html#182987845">(Dec 09 2019 at 19:02)</a>:</h4>
<p>Ah, I see. That got really confusing, but I see what you mean now</p>



<a name="182987906"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/QuantifiedApply/near/182987906" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/QuantifiedApply.html#182987906">(Dec 09 2019 at 19:02)</a>:</h4>
<p><span class="user-mention" data-user-id="125131">@detrumi</span> yeah it kind of confused me too for a bit, as I was working on the patch :)</p>



<a name="182987920"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/QuantifiedApply/near/182987920" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/QuantifiedApply.html#182987920">(Dec 09 2019 at 19:03)</a>:</h4>
<p>in particular one thing I was confused about was:</p>



<a name="182987934"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/QuantifiedApply/near/182987934" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/QuantifiedApply.html#182987934">(Dec 09 2019 at 19:03)</a>:</h4>
<p>there are two places in rust types where <code>for&lt;'a&gt;</code> comes into play</p>



<a name="182987941"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/QuantifiedApply/near/182987941" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/QuantifiedApply.html#182987941">(Dec 09 2019 at 19:03)</a>:</h4>
<p>one of them is <code>fn</code> types, the other is <code>dyn</code> types</p>



<a name="182987964"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/QuantifiedApply/near/182987964" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/QuantifiedApply.html#182987964">(Dec 09 2019 at 19:03)</a>:</h4>
<p>I think I originally imagined chalk would factor that out into a common place (hence the current design)</p>



<a name="182987978"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/QuantifiedApply/near/182987978" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/QuantifiedApply.html#182987978">(Dec 09 2019 at 19:03)</a>:</h4>
<p>but in fact <code>dyn</code> already includes the binders in its setup</p>



<a name="182987989"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/QuantifiedApply/near/182987989" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/QuantifiedApply.html#182987989">(Dec 09 2019 at 19:03)</a>:</h4>
<p>so really the only thing left for <code>for</code> is <code>fn</code></p>



<a name="182988002"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/QuantifiedApply/near/182988002" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/QuantifiedApply.html#182988002">(Dec 09 2019 at 19:03)</a>:</h4>
<p>I think in the end, just specializing to <code>fn</code> makes the type easier to understand anyway</p>



<a name="182988007"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/QuantifiedApply/near/182988007" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/QuantifiedApply.html#182988007">(Dec 09 2019 at 19:03)</a>:</h4>
<p>more connected to rust</p>



<a name="182988136"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/QuantifiedApply/near/182988136" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/QuantifiedApply.html#182988136">(Dec 09 2019 at 19:04)</a>:</h4>
<p>Yeah, being less general here makes it clearer and easier to solve</p>



<a name="183004176"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/QuantifiedApply/near/183004176" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/QuantifiedApply.html#183004176">(Dec 09 2019 at 21:51)</a>:</h4>
<p>Oh, I am re-reading our notes from last time,</p>



<a name="183004218"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/QuantifiedApply/near/183004218" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/QuantifiedApply.html#183004218">(Dec 09 2019 at 21:52)</a>:</h4>
<p>I see there is one more case I had overlooked -- generator witnesses</p>



<a name="183004221"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/QuantifiedApply/near/183004221" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/QuantifiedApply.html#183004221">(Dec 09 2019 at 21:52)</a>:</h4>
<p>maybe we'll just extend chalk with that concept directly, though</p>



<a name="184656119"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/QuantifiedApply/near/184656119" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/QuantifiedApply.html#184656119">(Jan 02 2020 at 14:51)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> I've rebased and updated the parser, so it should be good to go. I've renamed <code>TyData::ForAll</code> to <code>TyData::Function</code> as well. Was about to ask whether that <code>Box</code> was still needed, but seems like that was already removed in the meantime <span aria-label="slight smile" class="emoji emoji-1f642" role="img" title="slight smile">:slight_smile:</span></p>



<a name="184934556"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/QuantifiedApply/near/184934556" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/QuantifiedApply.html#184934556">(Jan 06 2020 at 18:52)</a>:</h4>
<p>Nice, <span class="user-mention" data-user-id="125131">@detrumi</span></p>



<a name="184938612"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/QuantifiedApply/near/184938612" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/QuantifiedApply.html#184938612">(Jan 06 2020 at 19:40)</a>:</h4>
<p>Left one <a href="https://github.com/rust-lang/chalk/pull/293#pullrequestreview-338851037" target="_blank" title="https://github.com/rust-lang/chalk/pull/293#pullrequestreview-338851037">minor nit</a>, otherwise ready to merge I think</p>



<a name="184951707"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/QuantifiedApply/near/184951707" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/QuantifiedApply.html#184951707">(Jan 06 2020 at 20:13)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> Nit fixed!</p>



<a name="184951734"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/QuantifiedApply/near/184951734" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/QuantifiedApply.html#184951734">(Jan 06 2020 at 20:13)</a>:</h4>
<p>nice</p>



<a name="184951798"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/QuantifiedApply/near/184951798" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/QuantifiedApply.html#184951798">(Jan 06 2020 at 20:14)</a>:</h4>
<p>merged!</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>